using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using System;


public enum ActionMoveTime 
{
    //造成伤害前
    preTakeDamage,
    //造成伤害后
    postTakeDamage,
    //承受伤害前
    preBeTakenDamage,
    //承受伤害后
    postBeTakenDamage,
}
/// <summary>
/// 记录所有战斗行为
/// </summary> <summary>
/// 
/// </summary>
public class ActionMove 
{
    public List<Action<SkillBase>> Listeners { get; set; } = new List<Action<SkillBase>>();

    public void AddListener(Action<SkillBase> action)
    {
        Listeners.Add(action);
    }

    public void RemoveListener(Action<SkillBase> action)
    {
        Listeners.Remove(action);
    }

    public void Trigger(SkillBase action)
    {
        foreach (var listener in Listeners)
        {
            listener.Invoke(action);
        }
    }

}
